package com.study.annotation;


import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.ComponentScan;
import org.springframework.context.annotation.Configuration;
import org.springframework.context.annotation.FilterType;

@Configuration
@ComponentScan(value = "com.study.annotation",
        //excludeFilters = {@ComponentScan.Filter(type = FilterType.ANNOTATION,classes = Controller.class)},
        includeFilters = {@ComponentScan.Filter(type = FilterType.CUSTOM,classes = {MyTypeFilter.class})},
        useDefaultFilters = false)
public class MainConfig  {
    @Bean
    public Person person(){
        System.out.println("实例化person");
        return new Person("注解配置测试");
    }

}
